<include file="public@agent_header"/>
</head>
<body>
<div class="wrap">
    <ul class="nav nav-tabs">
        <li class="<if input('status') == 0>active</if>"><a href="{:url('manager/index',array('status'=>0))}">订单待处理</a></li>
        <li class="<if input('status') == 1>active</if>"><a href="{:url('manager/index',array('status'=>1))}">订单已处理</a></li>
    </ul>
    <form class="well form-inline margin-top-20" method="post" action="{:url('pc/manager/index',array('status'=>input('status')))}">
        关键字：
        <input class="form-control" type="text" name="keyword" style="width: 200px;" value="{:input('request.keyword')}" placeholder="">
        <input type="submit" class="btn btn-primary" value="搜索"/>
        <a class="btn btn-danger" href="{:url('pc/manager/index',array('status'=>input('status')))}">清空</a>
    </form>
    <form method="post" class="js-ajax-form">
        <table class="table table-hover table-bordered">
            <thead>
            <tr>
                <th>订单号</th>
                <th>销售组织</th>
                <th>销售类型</th>
                <th>销售人员</th>
                <th>客户</th>
                <th>发货组织</th>
                <th>收货方式</th>
                <th>支付方式</th>
                <th>支付账期</th>
                <th>发货日期</th>
                <th>总重量</th>
                <th>总价</th>
                <th>下单时间</th>
                <th>操作</th>
            </tr>
            </thead>
            <tbody>
            <php>
                $sale_type_text = ['1'=>'直销','2'=>'经销'];
            </php>
                <foreach name="list" item="vo">
                <tr>
                    <td>{$vo.order_no}</td>
                    <td>{:factory_name($vo.sale_number)}</td>
                    <td>{$sale_type_text[$vo.sale_type]}</td>
                    <td>{$vo.staff_name}({$vo.staff_number})</td>
                    <td>{$vo.customer_name}({$vo.customer_number})</td>
                    <td>{$vo.factory_name}</td>
                    <td><if $vo.type == '自提'>{$vo.type}<else/>{$vo.receiving_address}</if></td>
                    <td>{$vo.pay_type}</td>
                    <td>{$vo.pay_account}</td>
                    <td>{$vo.fahuo_date}</td>
                    <td>{$vo.total_weight}</td>
                    <td>{$vo.total_price}</td>
                    <td>{$vo.create_time}</td>
                    <td>
                        <a class="btn btn-xs btn-primary" href="javascript:parent.openIframeLayer('{:url('index/details',array('id'=>$vo['id']))}','详情',{'area':['760px','80%']});">详情</a>
                        <if $vo.abnormal_position == 2 && $vo.status == 0>
                        <a class="btn btn-xs btn-success" href="javascript:parent.openIframeLayer('{:url('manager/examine',array('id'=>$vo['id']))}','详情',{'area':['600px','400px']});">处理</a>
                        </if>
                    </td>
                </tr>
                </foreach>
            </tbody>
        </table>
        <div class="pagination">{$page}</div>
    </form>
</div>
<script src="__STATIC__/js/admin.js"></script>
<script src="__STATIC__/layui/layui.js"></script>
<script type="text/javascript">
layui.use(['layer'],function(){
    var layer = layui.layer;

    
});
</script>
</body>
</html>